package com.JavaBean.Ord_Rol_Use;

import java.util.ArrayList;
import java.util.Date;

public class User {
    private int id;
    private String name;
    private String password;
    private Date birthday;
    private Orders orders;

    public User() {
    }

    public User(int id, String name, String password, Date birthday, Orders orders) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.birthday = birthday;
        this.orders = orders;
    }

    /**
     * 获取
     * @return id
     */
    public int getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     * @return birthday
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     * 设置
     * @param birthday
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * 获取
     * @return orders
     */
    public Orders getOrders() {
        return orders;
    }

    /**
     * 设置
     * @param orders
     */
    public void setOrders(Orders orders) {
        this.orders = orders;
    }

    public String toString() {
        return "User{id = " + id + ", name = " + name + ", password = " + password + ", birthday = " + birthday + ", orders = " + orders + "}";
    }


//    public String toString() {
//        return "User{id=" + id + ", name='" + name + '\'' + ", password='" + (password == null ? "null" : "****") + '\'' // 隐藏密码
//                + ", birthday=" + birthday + '}';
//    }
}
